package com.ftwj.service;

import com.ftwj.entity.NoticeInfo;
import com.ftwj.mapper.NoticeInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeInfoService {
    @Autowired
    private NoticeInfoMapper noticeInfoMapper;

    /**
     * 获取所有公告
     * @return 公告列表
     */
    public List<NoticeInfo> getAllNotices() {

        return noticeInfoMapper.SelectAllNotices();
    }
    public NoticeInfo getNoticeById(String id) {
        return noticeInfoMapper.getNoticeById(id);
    }

}
